PrimeFaces.widget.LightBox.prototype.setupIframe = function() {
var $this = this;
this.iframeLoaded = false;
this.cfg.width = this.cfg.width || '640px';
this.cfg.height = this.cfg.height || '480px';
this.iframe = $('<iframe frameborder="0" style="width:' + this.cfg.width + ';height:'
+ this.cfg.height + ';border:0 none; display: block;"></iframe>').appendTo(this.content);
if (this.cfg.iframeTitle) {
this.iframe.attr('title', this.cfg.iframeTitle);
}
this.links.click(function(e) {
if (!$this.iframeLoaded) {
$this.content.addClass('ui-lightbox-loading').css({
width: $this.cfg.width
, height: $this.cfg.height
});
$this.show();
$this.iframe.on('load', function() {
$this.iframeLoaded = true;
$this.content.removeClass('ui-lightbox-loading');
})
.attr('src', $this.links.eq(0).attr('href'));
}
else {
$this.show();
}
var title = $this.links.eq(0).attr('title');
if (title) {
//$this.caption.html(title);
$this.captionText.html(title);
$this.caption.slideDown();
}
e.preventDefault();
});
}

PrimeFaces.widget.LightBox.prototype.createPanel = function() {
var dom = '<div id="' + this.id + '_panel" class="ui-lightbox ui-widget ui-helper-hidden ui-corner-all ui-shadow">';
dom += '<div class="ui-lightbox-caption ui-widget-header"><span class="ui-lightbox-caption-text"></span>';
dom += '<a class="ui-lightbox-close ui-corner-all" href="#"><span class="ui-icon ui-icon-closethick"></span></a><div style="clear:both" /></div>';
dom += '<div class="ui-lightbox-content-wrapper">';
dom += '<a class="ui-state-default ui-lightbox-nav-left ui-corner-right ui-helper-hidden"><span class="ui-icon ui-icon-carat-1-w">go</span></a>';
dom += '<div class="ui-lightbox-content ui-corner-all"></div>';
dom += '<a class="ui-state-default ui-lightbox-nav-right ui-corner-left ui-helper-hidden"><span class="ui-icon ui-icon-carat-1-e">go</span></a>';
dom += '</div>';
dom += '</div>';
$(document.body).append(dom);
this.panel = $(this.jqId + '_panel');
this.contentWrapper = this.panel.children('.ui-lightbox-content-wrapper');
this.content = this.contentWrapper.children('.ui-lightbox-content');
this.caption = this.panel.children('.ui-lightbox-caption');
this.captionText = this.caption.children('.ui-lightbox-caption-text');
this.closeIcon = this.caption.children('.ui-lightbox-close');
};